package com.alavente.adapters;

import com.alavente.forms.AchatForm;
import com.alavente.objects.Achat;
import com.alavente.objects.Client;
import com.alavente.objects.DemandeVente;

public class AchatAdapter extends AbstractAdapter<AchatForm, Achat>{

public Achat adapt(AchatForm form) {
		
		Achat achat = new Achat();		
		super.adapt(form, achat);
		achat.setClient(new Client(form.getNumUser()));
		achat.setDemandeVente(new DemandeVente(form.getNumDemande()));
		
		return achat;
	}
}
